<script type="text/javascript" src="/My97DatePicker/WdatePicker.js"></script>
<?php use \yii\helpers\Html;?>
<!-- 树形菜单选择 -->
<link rel="stylesheet" type="text/css" href="/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="/easyui/themes/icon.css">
<script type="text/javascript" src="/easyui/jquery.easyui.min.js"></script>
<script src="/laydate/laydate.js"></script>
<div class="span10" id="datacontent">
    <ul class="breadcrumb">
        <li><a href="/content/ads-banner/index">预留电话</a> <span class="divider">/</span></li>
        <li class="active">查看</li>
    </ul>
    <!--    <ul class="nav">-->
    <!--        <li class="dropdown pull-right">-->
    <!--            <a class="dropdown-toggle" href="/content/resource/add">添加</a>-->
    <!--        </li>-->
    <!--    </ul>-->
    <form action="<?php echo baseUrl?>/exercise/report/index" method="get" class="form-horizontal">
        <table class="table">
            <tr>
                <td>
                    题目来源：
                </td>
                <td>
                    <select name="type">
                        <option value="" <?php echo isset($_GET['type'])&&$_GET['type']==""?"selected":''?>>全部</option>
                        <option value="5" <?php echo isset($_GET['type'])&&$_GET['type']==5?"selected":''?>>全套模考</option>
                        <option value="2" <?php echo isset($_GET['type'])&&$_GET['type']==2?"selected":''?>>阅读模考</option>
                        <option value="1" <?php echo isset($_GET['type'])&&$_GET['type']==1?"selected":''?>>听力模考</option>
                    </select>
                </td>
                <td>
                    反馈时间：
                </td>
                <td>
                    <input class="input-small Wdate" onclick="WdatePicker()" type="text" size="10"  name="beginTime" value="<?php echo isset($_GET['beginTime'])?$_GET['beginTime']:''?>"/> - <input class="input-small Wdate" onclick="WdatePicker()"  size="10" type="text" name="endTime"  value="<?php echo isset($_GET['endTime'])?$_GET['endTime']:''?>"/>
                </td>
            </tr>
            <tr>
                <td>
                    反馈类型：
                </td>
                <td>
                    <select name="reportType">
                        <option value="" <?php echo isset($_GET['reportType'])&&$_GET['reportType']==""?"selected":''?>>全部</option>
                        <option value="1" <?php echo isset($_GET['reportType'])&&$_GET['reportType']==1?"selected":''?>>题干有误</option>
                        <option value="2" <?php echo isset($_GET['reportType'])&&$_GET['reportType']==2?"selected":''?>>答案有误</option>
                        <option value="3" <?php echo isset($_GET['reportType'])&&$_GET['reportType']==3?"selected":''?>>格式有误</option>
                        <option value="4" <?php echo isset($_GET['reportType'])&&$_GET['reportType']==4?"selected":''?>>解析有误</option>
                        <option value="5" <?php echo isset($_GET['reportType'])&&$_GET['reportType']==5?"selected":''?>>其他问题</option>
                    </select>
                </td>
                <td>
                    <button class="btn btn-primary" type="submit">提交</button>
                </td>
            </tr>
        </table>
    </form>
    <form action="/content/content/sort" method="post">
        <table class="table table-hover add_defined">
            <thead>
            <tr>
                <th width="80">ID</th>
                <th width="80">用户</th>
                <th>反馈类型</th>
                <th>反馈题目</th>
                <th>描述</th>
                <th>反馈时间</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <?php foreach($content as $v):?>
                <tr>
                    <td><?php echo $v['id'];?></td>
                    <td><?php echo $v['username'];?></td>
                    <td> <?php
                        switch($v['reportType']){
                            case 1:echo $v['reportType']='题干有误';break;
                            case 2:echo $v['reportType']='答案有误';break;
                            case 3:echo $v['reportType']='格式有误';break;
                            case 4:echo $v['reportType']='解析有误';break;
                            case 5:echo $v['reportType']='其他问题';break;
                        }
                        ?></td>
                    <td><?php echo  $v['name'];?></td>
                    <td><?php echo  $v['description'];?></td>
                    <td><?php echo date('Y-m-d H:i:s', $v['createTime']);?></td>
                    <td class="notSLH" style="width: 247px;">
                        <div>
                            <?php if($v['status'] == 1):?>
                                <a class="btn btn-success" disabled="">已处理</a>
                            <?php else:?>
                                <a class="btn btn-success" href="/exercise/report/handle-status?id=<?= Html::encode($v['id'])?>">未处理</a>
                            <?php endif;?>
                        </div>
                    </td>
                </tr>
            <?php endforeach;?>
            </tbody>
        </table>
        <input type="hidden" name="url" value="">
    </form>
    <div class="pagination pagination-right">
        <input type="hidden" id="jumpUrl" value="<?php echo Yii::$app->request->getUrl();?>" />
        <?php use yii\widgets\LinkPager;?>
        <?php echo LinkPager::widget([
            'pagination' => $page,
        ])?>
    </div>
    <script>
    </script>

